global.webpackJsonp([ 66 ], {
    "17lZ": function(t, o, n) {
        Object.defineProperty(o, "__esModule", {
            value: !0
        });
        var e = n("Reut"), i = n("5nAL");
        new (n.n(i).a)(e.a).$mount(), o.default = {
            config: {
                navigationBarTitleText: "动态详情"
            }
        };
    },
    "4j19": function(t, o) {},
    Reut: function(t, o, n) {
        var e = n("sUYF"), i = n("ciOs"), s = n("hHyJ")(e.a, i.a, function(t) {
            n("4j19");
        }, null, null);
        o.a = s.exports;
    },
    ciOs: function(t, o, n) {
        var e = {
            render: function() {
                var t = this, o = t.$createElement, n = t._self._c || o;
                return n("div", {
                    staticClass: "new-detail-page",
                    class: [ t.isIphoneX ? "is-iphone-x" : "", "theme-" + t.theme ]
                }, [ t.postInfo.createAccountId ? n("div", {
                    staticClass: "user-info"
                }, [ n("div", {
                    staticClass: "info-left"
                }, [ n("div", {
                    staticClass: "image-header",
                    attrs: {
                        eventid: "0"
                    },
                    on: {
                        tap: function(o) {
                            o.stopPropagation(), t.viewAccountPage(o);
                        }
                    }
                }, [ t.postInfo.createAccountAvatar ? n("img", {
                    attrs: {
                        src: t.postInfo.createAccountAvatar,
                        alt: "",
                        mode: "aspectFill"
                    }
                }) : n("xc-icon", {
                    attrs: {
                        color: "#e3e4e8",
                        size: "60",
                        name: "yonghu",
                        "size-unit": "rpx",
                        mpcomid: "0"
                    }
                }) ], 1), t._v(" "), n("div", {
                    staticClass: "header-info"
                }, [ n("div", {
                    staticClass: "name"
                }, [ t._v(t._s(t.postInfo.createAccountName)) ]), t._v(" "), n("div", {
                    staticClass: "time"
                }, [ t._v("2019/01/28 12:00") ]) ]) ]), t._v(" "), n("div", {
                    staticClass: "info-right"
                }, [ n("xc-button", {
                    attrs: {
                        type: t.postInfo.followFlag ? "confirm" : "primary",
                        text: t.postInfo.followFlag ? "已关注" : "+ 关注",
                        eventid: "1",
                        mpcomid: "1"
                    },
                    on: {
                        tap: t.followingOps
                    }
                }) ], 1) ]) : t._e(), t._v(" "), t.postInfo.createAccountId ? n("div", {
                    staticClass: "post-view"
                }, [ n("post-view", {
                    attrs: {
                        "detail-page-flag": "true",
                        item: t.postInfo,
                        media: t.postInfo.media,
                        "hide-user-info": !0,
                        eventid: "2",
                        mpcomid: "2"
                    },
                    on: {
                        videoChange: t.changeVideoState
                    }
                }) ], 1) : t._e(), t._v(" "), n("div", {
                    staticClass: "bottom-set-view",
                    class: {
                        "is-iphone-x": t.isIphoneX,
                        "share-view": t.shareFlag
                    }
                }, [ t.shareFlag ? n("div", {
                    staticClass: "item",
                    attrs: {
                        eventid: "3"
                    },
                    on: {
                        tap: t.returnHome
                    }
                }, [ n("xc-icon", {
                    attrs: {
                        color: "#888",
                        size: "24",
                        name: "zuo",
                        "size-unit": "rpx",
                        mpcomid: "3"
                    }
                }), t._v("\n            回到首页\n        ") ], 1) : t._e(), t._v(" "), n("div", {
                    staticClass: "item",
                    attrs: {
                        eventid: "4"
                    },
                    on: {
                        tap: function(o) {
                            t.favoriteOps();
                        }
                    }
                }, [ t.postInfo.favoriteFlag ? n("xc-icon", {
                    attrs: {
                        name: "chengchangxiangcedian",
                        size: "22",
                        "ex-class": "normal-icon",
                        mpcomid: "5"
                    }
                }) : n("xc-icon", {
                    attrs: {
                        name: "chengchangxiangce",
                        size: "22",
                        color: "#888",
                        mpcomid: "4"
                    }
                }) ], 1), t._v(" "), n("div", {
                    staticClass: "item",
                    attrs: {
                        eventid: "5"
                    },
                    on: {
                        tap: function(o) {
                            t.giveLike();
                        }
                    }
                }, [ t.postInfo.likeFlag ? n("xc-icon", {
                    attrs: {
                        "ex-class": "normal-icon",
                        size: "50",
                        name: "dianzan",
                        "size-unit": "rpx",
                        mpcomid: "7"
                    }
                }) : n("xc-icon", {
                    attrs: {
                        color: "#888",
                        size: "50",
                        name: "dianzan1",
                        "size-unit": "rpx",
                        mpcomid: "6"
                    }
                }), t._v(" "), t.postInfo.likeNum && "0" != t.postInfo.likeNum ? n("span", {
                    staticClass: "like-num"
                }, [ t._v(t._s(t.postInfo.likeNum)) ]) : t._e() ], 1), t._v(" "), n("div", {
                    staticClass: "item"
                }, [ n("button", {
                    staticClass: "share",
                    attrs: {
                        "open-type": "share",
                        "data-name": "pageShare"
                    }
                }, [ n("xc-icon", {
                    attrs: {
                        color: "#fff",
                        size: "24",
                        name: "fenxiang2",
                        "size-unit": "rpx",
                        mpcomid: "8"
                    }
                }), t._v(" "), n("div", {
                    staticClass: "desc"
                }, [ t._v("分享") ]) ], 1) ], 1) ]) ]);
            },
            staticRenderFns: []
        };
        o.a = e;
    },
    sUYF: function(t, o, n) {
        var e = n("Dd8w"), i = n.n(e), s = n("mvHQ"), a = n.n(s), c = n("bWJ8"), l = n("75He"), f = n("zIHJ"), r = n("oqQY"), p = n.n(r), u = n("khYN"), d = n("YaEn"), I = n("RyI1"), m = n.n(I), v = n("IcnI"), g = n("LoF5"), h = n("8xno");
        o.a = {
            data: function() {
                return {
                    accountId: "",
                    info: {},
                    postId: "",
                    accountInfo: {},
                    postInfo: {},
                    followingAccounts: [],
                    videoContext: "",
                    shareFlag: !1
                };
            },
            components: {
                "xc-icon": l.a,
                "xc-button": c.a,
                "post-view": g.a
            },
            mixins: [ h.a ],
            onLoad: function() {
                this.accountId = this.$root.$mp.query.accountId || "", this.postId = this.$root.$mp.query.postId || "", 
                this.shareFlag = this.$root.$mp.query.shareFlag || !1, this.getFollowing(), this.getPostDetail(), 
                this.videoContext && this.videoContext.pause();
            },
            onUnload: function() {
                this.videoContext && this.videoContext.pause(), this.postInfo = {};
            },
            onShareAppMessage: function(t) {
                if ("button" === t.from) {
                    var o = "pages/index/main?r=accountPostDetail&postId=" + this.postInfo.postId + "&shareFlag=true";
                    return console.log(o), {
                        title: "快去分享动态吧！",
                        path: "pages/index/main?r=accountPostDetail&postId=" + this.postInfo.postId + "&shareFlag=true",
                        success: function() {
                            console.log("转发成功: " + a()(t));
                        },
                        fail: function(t) {
                            console.log("转发失败");
                        }
                    };
                }
            },
            methods: {
                getFollowing: function() {
                    var t = this;
                    f.a.getFollowing().then(function(o) {
                        t.followingAccounts = o.followingAccounts || [];
                    });
                },
                getPostDetail: function() {
                    var t = this;
                    f.a.getPosts(this.postId).then(function(o) {
                        var n = o.data;
                        if (n.createTime = p()(t.postInfo.createTime).format("YYYY/MM/DD HH:mm"), t.postInfo = n, 
                        t.followingAccounts && t.followingAccounts.length > 0) {
                            var e = m()(t.followingAccounts, function(o) {
                                return o.accountId === t.postInfo.createAccountId;
                            }) || [];
                            t.postInfo.followFlag = e.length > 0;
                        }
                        if (t.postInfo.likeList.length > 0) {
                            var i = m()(t.postInfo.likeList, function(t) {
                                return t.accountId === v.a.state.loginInfo.accountId;
                            });
                            t.postInfo.likeFlag = i.length > 0;
                        }
                        if (t.postInfo.favoriteList.length > 0) {
                            var s = m()(t.postInfo.favoriteList, function(t) {
                                return t.createAccountId === v.a.state.loginInfo.accountId;
                            });
                            t.postInfo.favoriteFlag = s.length > 0;
                        }
                        t.postInfo.media && t.postInfo.media.length > 0 && "2" == t.postInfo.media[0].mediaType && (t.postInfo.media[0].videoStop = !0);
                    });
                },
                favoriteOps: function() {
                    var t = this, o = i()({}, this.postInfo);
                    this.postInfo.favoriteFlag ? Object(u.s)({
                        content: "确定移出成长相册？",
                        success: function(n) {
                            n.confirm && f.b.deletePost(t.postId).then(function(n) {
                                o.favoriteFlag = !1, t.postInfo = i()({}, o), t.$evtBus.$emit(t.$EVT_TYPES.REFRESH_FAVORITE_POST_LIST);
                            });
                        }
                    }) : f.b.addPost(this.postId).then(function(n) {
                        o.favoriteFlag = !0, t.postInfo = i()({}, o);
                    });
                },
                giveLike: function() {
                    var t = this;
                    this.postInfo.likeFlag ? f.b.cancelLike(this.postId).then(function() {
                        t.$set(t.postInfo, "likeFlag", !1);
                        var o = t.postInfo.likeNum ? parseInt(t.postInfo.likeNum) - 1 : "";
                        t.postInfo.likeNum = o;
                    }) : f.b.giveLike(this.postId).then(function() {
                        t.$set(t.postInfo, "likeFlag", !0);
                        var o = t.postInfo.likeNum ? parseInt(t.postInfo.likeNum) + 1 : 1;
                        t.postInfo.likeNum = o;
                    });
                },
                returnHome: function() {
                    Object(u.j)({
                        url: "/pages/index/main?tab=community"
                    });
                },
                followingOps: function() {
                    var t = this;
                    this.postInfo.followFlag ? Object(u.s)({
                        content: "确定取消关注？",
                        success: function(o) {
                            o.confirm && f.a.unfollow(t.accountId).then(function() {
                                t.$set(t.postInfo, "followFlag", !1);
                            });
                        }
                    }) : f.a.follow(this.accountId).then(function() {
                        t.$set(t.postInfo, "followFlag", !0);
                    });
                },
                changeVideoState: function() {
                    this.$set(this.postInfo.media[0], "videoStop", !1), this.videoContext = wx.createVideoContext(this.postInfo.media[0].mediaUrl), 
                    this.videoContext.play();
                },
                viewAccountPage: function() {
                    d.a.go({
                        key: "accountHomepage",
                        params: {
                            accountId: this.postInfo.accountId,
                            followFlag: this.postInfo.followFlag
                        }
                    });
                }
            }
        };
    }
}, [ "17lZ" ]);